#define _CRT_SECURE_NO_WARNINGS

#include <stdio.h>

int main()
{
	int n;
	float ele;
	int mns = 0, zr = 0, z = 0;
	while (scanf("%d", &n), n != 0)
	{
		int i = 1;
		for (i; i <= n; i++)
		{
			scanf("%f", &ele);
			if (ele < 0)
				mns++;
			else if (ele == 0)
				zr++;
			else
				z++;
		}
		printf("%d %d %d\n", mns, zr, z);
		mns = 0;
		zr = 0;
		z = 0;
	}

	return 0;
}